\hypertarget{gamewidget_8h}{
\section{gamewidget.h File Reference}
\label{gamewidget_8h}\index{gamewidget.h@{gamewidget.h}}
}
{\ttfamily \#include $<$QGLWidget$>$}\par
{\ttfamily \#include $<$QTime$>$}\par
{\ttfamily \#include $<$QFile$>$}\par
{\ttfamily \#include $<$fstream$>$}\par
{\ttfamily \#include \char`\"{}defines.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}gameengine.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}shaderprograms.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}rotationsensor.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}accelometersensor.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}musicplayer.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}particledata.h\char`\"{}}\par
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct_texture_data}{TextureData}
\begin{DoxyCompactList}\small\item\em Data structure for storing data for OpenGL texture objects. \item\end{DoxyCompactList}\item 
struct \hyperlink{struct_comet_texture_data}{CometTextureData}
\begin{DoxyCompactList}\small\item\em Data structure for comet texture data. \item\end{DoxyCompactList}\item 
class \hyperlink{class_game_widget}{GameWidget}
\begin{DoxyCompactList}\small\item\em {\ttfamily \hyperlink{class_game_widget}{GameWidget}} class instance renders the game screen, it also owns a {\ttfamily \hyperlink{class_game_engine}{GameEngine}} instance and calls the main game loop ({\ttfamily \hyperlink{class_game_engine_a0cb4c8cd0289b828d85588f68e728153}{GameEngine::cycleGameLoop()}}) in game play mode on each {\ttfamily \hyperlink{class_game_widget_ad0211cd1e61a458b9ab483fecaa7cb20}{paintGL()}} screen refresh call. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{gamewidget_8h_afdb31e8d1c9c347776dc4fbfb57d9520}{MSECS\_\-BUFF\_\-SIZE}~3
\begin{DoxyCompactList}\small\item\em Size of an array for storing time measurements (see {\ttfamily \hyperlink{class_game_widget_a9b1db5e920770f5df1b18945453cb349}{GameWidget::millisecondsArray}}). \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_aa5614e8684d1b99c523cc9257aa79252}{
\#define \hyperlink{gamewidget_8h_aa5614e8684d1b99c523cc9257aa79252}{SPACESHIP\_\-CONE\_\-INDICES}~72}
\label{gamewidget_8h_aa5614e8684d1b99c523cc9257aa79252}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for space ship in the cone mode. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_a557a3595f9027f4115677acab6ff9ef7}{
\#define \hyperlink{gamewidget_8h_a557a3595f9027f4115677acab6ff9ef7}{SPACESHIP\_\-BALL\_\-INDICES}~72}
\label{gamewidget_8h_a557a3595f9027f4115677acab6ff9ef7}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for space ship in the ball mode. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_a5ef3eaa596ea5d4421cf251657144766}{
\#define \hyperlink{gamewidget_8h_a5ef3eaa596ea5d4421cf251657144766}{ASTEROID\_\-INDICES}~108}
\label{gamewidget_8h_a5ef3eaa596ea5d4421cf251657144766}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for large asteroid. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_a7b4df3286143178ab98f6f532499ef9a}{
\#define \hyperlink{gamewidget_8h_a7b4df3286143178ab98f6f532499ef9a}{ASTEROID\_\-MEDIUM\_\-INDICES}~54}
\label{gamewidget_8h_a7b4df3286143178ab98f6f532499ef9a}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for medium sized asteroid. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_a477eaf6a4cb644d8b7272d158cafefe7}{
\#define \hyperlink{gamewidget_8h_a477eaf6a4cb644d8b7272d158cafefe7}{MINERAL\_\-INDICES}~72}
\label{gamewidget_8h_a477eaf6a4cb644d8b7272d158cafefe7}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for mineral. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_a978fcdcba3ba74698508b808371c8820}{
\#define \hyperlink{gamewidget_8h_a978fcdcba3ba74698508b808371c8820}{UFO\_\-COLOR1\_\-INDICES}~144}
\label{gamewidget_8h_a978fcdcba3ba74698508b808371c8820}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for UFO (color 1). \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_a70f433a0989097575079ad3bad787226}{
\#define \hyperlink{gamewidget_8h_a70f433a0989097575079ad3bad787226}{UFO\_\-COLOR2\_\-INDICES}~144}
\label{gamewidget_8h_a70f433a0989097575079ad3bad787226}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for UFO (color 2). \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_a4ff5e032a3803668a05b8ccfcad2c9a6}{
\#define \hyperlink{gamewidget_8h_a4ff5e032a3803668a05b8ccfcad2c9a6}{UFO\_\-LIGHTS\_\-INDICES}~36}
\label{gamewidget_8h_a4ff5e032a3803668a05b8ccfcad2c9a6}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for UFO lights. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_aea93f8da5aac51b64c0fbe520b9cf63b}{
\#define \hyperlink{gamewidget_8h_aea93f8da5aac51b64c0fbe520b9cf63b}{MISSILE\_\-INDICES}~72}
\label{gamewidget_8h_aea93f8da5aac51b64c0fbe520b9cf63b}

\begin{DoxyCompactList}\small\item\em Number of indices in the array describing the OpenGL model for missile. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_af7461e67446dbd218d7d576e1d729548}{
\#define \hyperlink{gamewidget_8h_af7461e67446dbd218d7d576e1d729548}{BG\_\-GRID\_\-X\_\-SIZE}~16}
\label{gamewidget_8h_af7461e67446dbd218d7d576e1d729548}

\begin{DoxyCompactList}\small\item\em Size of background grid for X axle. \item\end{DoxyCompactList}\item 
\hypertarget{gamewidget_8h_ace142effefea35ffaa2347d074b3f337}{
\#define \hyperlink{gamewidget_8h_ace142effefea35ffaa2347d074b3f337}{BG\_\-GRID\_\-Y\_\-SIZE}~10}
\label{gamewidget_8h_ace142effefea35ffaa2347d074b3f337}

\begin{DoxyCompactList}\small\item\em Size of background grid for Y axle. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Define Documentation}
\hypertarget{gamewidget_8h_afdb31e8d1c9c347776dc4fbfb57d9520}{
\index{gamewidget.h@{gamewidget.h}!MSECS\_\-BUFF\_\-SIZE@{MSECS\_\-BUFF\_\-SIZE}}
\index{MSECS\_\-BUFF\_\-SIZE@{MSECS\_\-BUFF\_\-SIZE}!gamewidget.h@{gamewidget.h}}
\subsubsection[{MSECS\_\-BUFF\_\-SIZE}]{\setlength{\rightskip}{0pt plus 5cm}\#define MSECS\_\-BUFF\_\-SIZE~3}}
\label{gamewidget_8h_afdb31e8d1c9c347776dc4fbfb57d9520}


Size of an array for storing time measurements (see {\ttfamily \hyperlink{class_game_widget_a9b1db5e920770f5df1b18945453cb349}{GameWidget::millisecondsArray}}). 

Initial value for time measurement.

40 ms -\/$>$ 25 fps (this is for timestep measurement at start-\/up). See {\ttfamily \hyperlink{class_game_widget_a9b1db5e920770f5df1b18945453cb349}{GameWidget::millisecondsArray}} 